import logging,yagmail
from BeautifulReport import BeautifulReport
class tool():
    def Log(self):
        log=logging.basicConfig(level=logging.DEBUG,
                                format='%(levelname)s -> %(filename)s -> %(lineno)d',
                                filename='mici.log',
                                filemode='a+')
        return log
    def baogao(self,suite):
        BeautifulReport(suite).report(filename='moisu.html',description='测试a3mall')
    def send_emxeail(self,filename):
        send=yagmail.SMTP(user='3177622011@qq.com',password='xjwzrxaryqjydece',host='smtp.qq.com')
        send.send(to='3177622011@qq.com',subject='测试报告',attachments=filename,contents='发宋邮箱')
        send.close()
